package com.thinkgem.jeesite.common.emu;

public enum OnlineStatus {
	Online("在线","1"),Publishing("发布中","3"),Offline("离线","0");
	private String name;  
    private String index;  
    // 构造方法  
    private OnlineStatus(String name, String index) {  
        this.name = name;  
        this.index = index;  
    }  
    // 普通方法  
    public static String getName(String index) {  
        for (OnlineStatus c : OnlineStatus.values()) {  
            if (c.getIndex().equals(index)) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
    // get set 方法  
    public String getName() {  
        return name;  
    }  
    public void setName(String name) {  
        this.name = name;  
    }  
    public String getIndex() {  
        return index;  
    }  
    public void setIndex(String index) {  
        this.index = index;  
    }  
}
